import java.util.ArrayList;
import java.util.Comparator;
import java.util.List;
import java.util.stream.Collector;
import java.util.stream.Collectors;
import java.util.stream.Stream;

public class LambdaMain {

    public static void main(String[] str){
        List<Integer> list= Stream.of(1,2,3,4).collect(Collectors.toList());
        List<String> list1=Stream.of("a","b","c").map(string -> {return string.toUpperCase();}).collect(Collectors.toList());
        List<String> list2=Stream.of("a","b","c").map(String::toUpperCase).collect(Collectors.toList());
        System.out.println(list1);
        String s=Stream.of("aa","bbbb").min(Comparator.comparing(String::length)).get();

        System.out.println(s);
        int minv=Stream.of(1,2,3).reduce(0,(v2,v1) ->{System.out.println(v2);System.out.println(v1);return v2<v1?v2:v1;});


    }

}
